package com.lei.design.factory.pizza.store;

import com.lei.design.factory.pizza.pizza.Pizza;

/**
 * @Author LeiXiaoLei
 * @Date 2022/5/17 16:45
 * @Version 1.0
 */
public abstract class PizzaStore {

    public Pizza orderPizza(String type) {
        Pizza pizza = createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }

    protected abstract Pizza createPizza(String type);
}
